package com.wanmait.movie.webController;

import com.wanmait.movie.entity.Movie;
import com.wanmait.movie.service.MovieService;
import com.wanmait.movie.util.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/web/index")
public class WebController {

    @Resource
    private MovieService movieService;

    @GetMapping("getNewMovieList")
    public AjaxResult getNewMovieList(){
        return AjaxResult.success(movieService.getNewMovieList());
    }

    @GetMapping("getWantMovieList")
    public AjaxResult getWantMovieList(){
        return AjaxResult.success(movieService.getWantMovieList());
    }

}
